<!--审核论文页面-->
<<<<<<< HEAD
<script type="text/javascript"  src=http://47.95.143.128:8080/pageoffice.js id="po_js_main"></script>
<!--<script type="text/javascript"  src=http://localhost:8080/pageoffice.js id="po_js_main"></script>-->
=======
<script type="text/javascript"  src="/pageoffice.js" id="po_js_main"></script>
>>>>>>> dev
<script type="text/html" id="barDemo">
    <a href="#" class="layui-btn layui-btn-xs" lay-event="edit">审核论文</a>
</script>
<div class="layui-inline">
    <div class="layui-input-inline">
        <input class="layui-input" name="search_input" id="search_input" autocomplete="off" placeholder="请输入学号或者题目进行搜索">
    </div>
</div>
<button class="layui-btn" data-type="reload">搜索</button>
<table id="check_paper" class="layui-hide" lay-filter="check_paper"></table>

<script>
    layui.use(['table','layer'], function() {
        var $ = layui.jquery,
            table = layui.table,
            layer = layui.layer;

        table.render({
            elem: '#check_paper'
            ,url:'/api/v1/teacher/OpenAndPaper'
            ,method:'GET'
            ,where:{
                "flag":"paper"
            }
            ,parseData: function (res) {
                return {
                    "code": res.code,
                    "msg": res.msg,
                    "count": res.data.number,
                    "data": res.data.content
                };
            }
            ,cols: [[
                {checkbox: true, fixed: true}
                ,{width:80, title: '序号',type:'numbers'}
                ,{field:'id', width:80, title: '序号', sort: true,hide:true}
                ,{field:'studentId', width:158, title: '学号'}
                ,{field:'fileName', width:362, title: '文件名称'}
                ,{field:'uploadTime', width:167, title: '上传时间', sort: true}
                ,{field:'status', width:89, title: '文件状态'}
                ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:161}
            ]]
            ,page: true
        });

        // 监听每一行的工具条
        table.on('tool(check_paper)', function(obj){
            let data = obj.data;
            let layEvent = obj.event;
            if(layEvent === 'edit'){
<<<<<<< HEAD
                // test
                //POBrowser.openWindowModeless('http://localhost:8080/teacher/check?studentId='+data.studentId+'&flag=paper',"fullscreen=yes;resizable=yes");
                // prod
                POBrowser.openWindowModeless('http://47.95.143.128:8080/teacher/check?studentId='+data.studentId+'&flag=paper',"fullscreen=yes;resizable=yes");
=======
                POBrowser.openWindowModeless('/api/v1/teacher/design/'+data.studentId+'/paper',"fullscreen=yes;resizable=yes");
>>>>>>> dev
            }
        });
    });

</script>